﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GU.WebERP.Core.Utils
{
    public class MD5Helper
    {
        /// <summary>
        /// 给一个字符串进行MD5加密
        /// </summary>
        /// <param name="str">待加密的字符串</param>
        /// <returns>加密后的字符串</returns>
        public static string Encrypt(string input)
        {
            byte[] i = Encoding.UTF8.GetBytes(input);
            byte[] o = System.Security.Cryptography.MD5.Create().ComputeHash(i);
            return BitConverter.ToString(o).Replace("-", "");
        }
    }
}
